package com.euond.permission.service;

import com.euond.common.core.dto.ResultDto;
import com.euond.common.core.service.BaseService;
import com.euond.permission.dto.DataPrivilegeDtlDto;
import com.euond.permission.entities.DataPrivilegeDtl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by user on 2018/1/6.
 */
public interface DataPrivilegeDtlService extends BaseService<DataPrivilegeDtl>{

    /**
     * 根据权限配置ID查询权限配置明细
     * @param searchParams
     * @return
     */
    public ResultDto findDataPrivilegeDtlByPrivilegeId(Map<String,Object> searchParams);

    /**
     * 根据权限配置ID删除权限配置明细
     * @param privilegeId
     * @return
     */
    public void deleteDataPrivilegeDtlByPrivilegeId(long privilegeId);

    /**
     * 查询数据权限需要的数据
     * @param privilegeId,resourceUrl
     * @return
     */
    public List<DataPrivilegeDtlDto> findDataPrivilegeDtlDto(Long privilegeId, String resourceUrl);

    /**
     * 根据权限配置ID查询所有的资源(url)
     * @param privilegeId
     * @return
     */
    public String findDataPrivilegeDtlResource(long privilegeId);
}
